
import Home from '@/views/Home.vue'
import Category from '@/views/Category.vue'
import Cart from '@/views/Cart.vue'
import Mine from '@/views/Mine.vue'
// 导入 transition 效果的页面组件
import Neizhizujian from '@/views/Neizhizujian.vue'
// 导入 传送门效果案例的组件
import Teleportview from '@/views/Teleportview.vue';

import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/category',
        component: Category
    },
    {
        path: '/cart',
        component: Cart
    },
    {
        path: '/mine',
        component: Mine
    },
    {
        path: '/neizhi',
        component: Neizhizujian
    },
    {
        path: '/teleport',
        component: Teleportview
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router